<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  <cpn>
    <template v-slot:default="slotProp">
      <h1>{{slotProp.user}}</h1>
    </template>
  </cpn>
</div>

<template id="cpn">
  <span>
    <slot :user="username">{{username}}</slot>
  </span>
</template>

<script src="./js/vue.js"></script>

<script>
  const app = new Vue({
    el:'#app',
    data:{
      message:'Hello World'
    },
    components:{
      cpn:{
        template:'#cpn',
        data(){
          return {
            username:'Bin'
          }
        }
      }
    }
  });
</script>
</body>
</html>